home *** CD-ROM | disk | FTP | other *** search
- Path: xanth!mcnc!gatech!bloom-beacon!bu-cs!mirror!necntc!ncoast!allbery
- From: gregg@a.cs.okstate.edu (Gregg Wonderly)
- Newsgroups: comp.sources.misc
- Subject: v04i094: TPUVI for VMS part 3 of 17
- Message-ID: <8809212056.AA07672@uunet.UU.NET>
- Date: 26 Sep 88 01:48:20 GMT
- Sender: allbery@ncoast.UUCP
- Reply-To: gregg@a.cs.okstate.edu (Gregg Wonderly)
- Lines: 510
- Approved: allbery@ncoast.UUCP
-
- Posting-number: Volume 4, Issue 94
- Submitted-by: "Gregg Wonderly" <gregg@a.cs.okstate.edu>
- Archive-name: vms-vi-2/Part03
-
- $ show default
- $ if f$search("DOC.DIR;1") .eqs. "" then -
- CREATE/LOG/DIRECTORY [.DOC]
- $ write sys$output "Creating [.DOC]VI.RNO"
- $ create [.DOC]VI.RNO
- $ DECK/DOLLARS="*$*$*EOD*$*$*"
- .req "vi_1.rno"
- .req "vi_2.rno"
- *$*$*EOD*$*$*
- $ if f$search("DOC.DIR;1") .eqs. "" then -
- CREATE/LOG/DIRECTORY [.DOC]
- $ write sys$output "Creating [.DOC]VI.RNT"
- $ create [.DOC]VI.RNT
- $ DECK/DOLLARS="*$*$*EOD*$*$*"
- .! DSRTOC version V2.1-09
- .! RUNOFF/CONTENTS/OUT=VI VI.BRN
- .SAVE
- .NO FLAGS ALL
- .NO FLAGS BREAK .NO FLAGS CAPITALIZE .NO FLAGS ENDFOOTNOTE
- .NO FLAGS HYPHENATE .NO FLAGS INDEX .NO FLAGS PERIOD
- .NO FLAGS SPACE .NO FLAGS SUBSTITUTE
- .FLAGS ACCEPT _ .FLAGS BOLD * .FLAGS COMMENT !
- .FLAGS LOWERCASE \ .FLAGS OVERSTRIKE % .FLAGS UNDERLINE &
- .FLAGS UPPERCASE ^
- .FLAGS ALL
- .NO FILL .NO JUSTIFY
- .LEFT MARGIN 8 .RIGHT MARGIN 70 .PAGE SIZE , 70
- .CENTER;CONTENTS
- .BLANK
- .TEST PAGE 2
-
- 1 Table of contents . . . . . . . . . . . . . . . . . 2
- .ifnot global
- 2 Purpose of this document . . . . . . . . . . . . . . 3
- .endif global
- .ifnot global
- 3 Introduction to VI . . . . . . . . . . . . . . . . . 3
- .endif global
- .ifnot global
- 4 Extensions to VI . . . . . . . . . . . . . . . . . . 3
- .endif global
- .ifnot global
- 5 Using an initialization file . . . . . . . . . . . . 4
- .endif global
- .ifnot global
- 6 Supported EX mode commands . . . . . . . . . . . . . 5
- .endif global
- .if global
- 6_.1 Abort edit . . . . . . . . . . . . . . . . . . . . 5
- .endif global
- .ifnot global
- 6_.2 Change output file . . . . . . . . . . . . . . . . 5
- .endif global
- .ifnot global
- 6_.3 Compile TPU . . . . . . . . . . . . . . . . . . . 6
- .endif global
- .ifnot global
- 6_.4 Copy lines . . . . . . . . . . . . . . . . . . . . 6
- .endif global
- .ifnot global
- 6_.5 Create buffers . . . . . . . . . . . . . . . . . . 6
- .endif global
- .ifnot global
- 6_.6 Create key macro . . . . . . . . . . . . . . . . . 6
- .endif global
- .ifnot global
- 6_.7 Delete buffers . . . . . . . . . . . . . . . . . . 7
- .endif global
- .ifnot global
- 6_.8 Delete lines . . . . . . . . . . . . . . . . . . . 7
- .endif global
- .ifnot global
- 6_.9 Edit new file . . . . . . . . . . . . . . . . . . 7
- .endif global
- .ifnot global
- 6_.10 Execute command file . . . . . . . . . . . . . . . 8
- .endif global
- .ifnot global
- 6_.11 Fill text region . . . . . . . . . . . . . . . . . 8
- .endif global
- .ifnot global
- 6_.12 Global Substitution . . . . . . . . . . . . . . . 8
- .endif global
- .ifnot global
- 6_.13 Goto Line . . . . . . . . . . . . . . . . . . . . 8
- .endif global
- .ifnot global
- 6_.14 Goto tag in file . . . . . . . . . . . . . . . . . 9
- .endif global
- .ifnot global
- 6_.15 Help . . . . . . . . . . . . . . . . . . . . . . . 9
- .endif global
- .ifnot global
- 6_.16 Invert case . . . . . . . . . . . . . . . . . . . 9
- .endif global
- .ifnot global
- 6_.17 Learn Key Strokes . . . . . . . . . . . . . . . . 9
- .endif global
- .ifnot global
- 6_.18 Lower case . . . . . . . . . . . . . . . . . . . 10
- .endif global
- .ifnot global
- 6_.19 Message buffer . . . . . . . . . . . . . . . . . 10
- .endif global
- .ifnot global
- 6_.20 Move lines . . . . . . . . . . . . . . . . . . . 10
- .endif global
- .ifnot global
- 6_.21 Next file . . . . . . . . . . . . . . . . . . . 10
- .endif global
- .ifnot global
- 6_.22 Perform Macros . . . . . . . . . . . . . . . . . 10
- .endif global
- .ifnot global
- 6_.23 Previous file . . . . . . . . . . . . . . . . . 11
- .endif global
- .ifnot global
- 6_.24 Print out lines . . . . . . . . . . . . . . . . 11
- .endif global
- .ifnot global
- 6_.25 Read file into buffer . . . . . . . . . . . . . 11
- .endif global
- .ifnot global
- 6_.26 Rewind file list . . . . . . . . . . . . . . . . 11
- .endif global
- .ifnot global
- 6_.27 Select regions . . . . . . . . . . . . . . . . . 11
- .endif global
- .ifnot global
- 6_.28 Set default dir . . . . . . . . . . . . . . . . 11
- .endif global
- .ifnot global
- 6_.29 Set options . . . . . . . . . . . . . . . . . . 12
- .endif global
- .ifnot global
- 6_.30 Show buffers . . . . . . . . . . . . . . . . . . 12
- .endif global
- .ifnot global
- 6_.31 Showing Current Version . . . . . . . . . . . . 12
- .endif global
- .ifnot global
- 6_.32 Show file list . . . . . . . . . . . . . . . . . 12
- .endif global
- .ifnot global
- 6_.33 Show Tags . . . . . . . . . . . . . . . . . . . 13
- .endif global
- .ifnot global
- 6_.34 Spawn command . . . . . . . . . . . . . . . . . 13
- .endif global
- .ifnot global
- 6_.35 Spawn subprocess . . . . . . . . . . . . . . . . 13
- .endif global
- .ifnot global
- 6_.36 Substitution . . . . . . . . . . . . . . . . . . 13
- .endif global
- .ifnot global
- 6_.37 Text Abbreviations . . . . . . . . . . . . . . . 14
- .endif global
- .ifnot global
- 6_.38 Unmap key macros . . . . . . . . . . . . . . . . 14
- .endif global
- .ifnot global
- 6_.39 Upper case . . . . . . . . . . . . . . . . . . . 14
- .endif global
- .ifnot global
- 6_.40 Write buffer . . . . . . . . . . . . . . . . . . 14
- .endif global
- .ifnot global
- 6_.41 Write and exit . . . . . . . . . . . . . . . . . 15
- .endif global
- .ifnot global
- 7 Set options . . . . . . . . . . . . . . . . . . . 15
- .endif global
- .ifnot global
- 7_.1 Auto Send to DCL . . . . . . . . . . . . . . . . 15
- .endif global
- .ifnot global
- 7_.2 Auto line wrap . . . . . . . . . . . . . . . . . 16
- .endif global
- .ifnot global
- 7_.3 Auto write . . . . . . . . . . . . . . . . . . . 16
- .endif global
- .ifnot global
- 7_.4 Case insensitive search . . . . . . . . . . . . 16
- .endif global
- .ifnot global
- 7_.5 Change file list . . . . . . . . . . . . . . . . 16
- .endif global
- .ifnot global
- 7_.6 Error Bells . . . . . . . . . . . . . . . . . . 16
- .endif global
- .ifnot global
- 7_.7 Expand tabs . . . . . . . . . . . . . . . . . . 17
- .endif global
- .ifnot global
- 7_.8 Line report . . . . . . . . . . . . . . . . . . 17
- .endif global
- .ifnot global
- 7_.9 No write . . . . . . . . . . . . . . . . . . . . 17
- .endif global
- .ifnot global
- 7_.10 Paragraph delimiters . . . . . . . . . . . . . . 17
- .endif global
- .ifnot global
- 7_.11 Read Only Files . . . . . . . . . . . . . . . . 18
- .endif global
- .ifnot global
- 7_.12 Regular expression use . . . . . . . . . . . . . 18
- .endif global
- .ifnot global
- 7_.13 Screen length . . . . . . . . . . . . . . . . . 18
- .endif global
- .ifnot global
- 7_.14 Screen width . . . . . . . . . . . . . . . . . . 18
- .endif global
- .ifnot global
- 7_.15 Scroll amount . . . . . . . . . . . . . . . . . 19
- .endif global
- .ifnot global
- 7_.16 Section delimiters . . . . . . . . . . . . . . . 19
- .endif global
- .ifnot global
- 7_.17 Shift width . . . . . . . . . . . . . . . . . . 19
- .endif global
- .ifnot global
- 7_.18 Show settings . . . . . . . . . . . . . . . . . 19
- .endif global
- .ifnot global
- 7_.19 Tab stops . . . . . . . . . . . . . . . . . . . 20
- .endif global
- .ifnot global
- 7_.20 Tag Case . . . . . . . . . . . . . . . . . . . . 20
- .endif global
- .ifnot global
- 7_.21 Tags files . . . . . . . . . . . . . . . . . . . 20
- .endif global
- .ifnot global
- 7_.22 Type ahead . . . . . . . . . . . . . . . . . . . 20
- .endif global
- .ifnot global
- 7_.23 Undo and maps . . . . . . . . . . . . . . . . . 20
- .endif global
- .ifnot global
- 7_.24 Wrap on search . . . . . . . . . . . . . . . . . 21
- .endif global
- .ifnot global
- 8 Additional key strokes . . . . . . . . . . . . . . 21
- .endif global
- .ifnot global
- 8_.1 Key pad keys used . . . . . . . . . . . . . . . 21
- .endif global
- .ifnot global
- 8_.2 Keyboard keys used . . . . . . . . . . . . . . . 22
- .endif global
- .ifnot global
- 9 Windows and buffers . . . . . . . . . . . . . . . 22
- .endif global
- .ifnot global
- 10 Display differences . . . . . . . . . . . . . . . 23
- .endif global
- .ifnot global
- 11 Tag files . . . . . . . . . . . . . . . . . . . . 23
- .endif global
- .ifnot global
- 12 Kept Editors . . . . . . . . . . . . . . . . . . . 24
- .endif global
- .ifnot global
- 13 Other TPU's . . . . . . . . . . . . . . . . . . . 24
- .endif global
- .ifnot global
- 14 The DCL buffer . . . . . . . . . . . . . . . . . . 24
- .endif global
- .ifnot global
- 15 TPU bugs revealed . . . . . . . . . . . . . . . . 25
- .endif global
- .RESTORE
- *$*$*EOD*$*$*
- $ if f$search("DOC.DIR;1") .eqs. "" then -
- CREATE/LOG/DIRECTORY [.DOC]
- $ write sys$output "Creating [.DOC]VIDOC.COM"
- $ create [.DOC]VIDOC.COM
- $ DECK/DOLLARS="*$*$*EOD*$*$*"
- $ ! This command procedure builds copies of the various
- $ ! VI documentation files
- $ !
- $ DO="@[-.EXE]DO"
- $ IF F$LOGICAL ("VI$ROOT") .NES. "" THEN DO="@[EXE]DO"
- $ !
- $ RM=""
- $ IF P2 .NES. "" THEN RM=P2
- $ IF P1 .NES. "" THEN GOTO 'P1'
- $ !
- $ ! Build the printable manual by default
- $ !
- $ MANUAL:
- $ VARS="MANUAL" ! Actually there is no such variant, but something is needed
- $ EXT="MEM"
- $ FILE="VI"
- $ IF RM .EQS. "" THEN RM=8
- $ GOTO PROCESS
- $!
- $! Build the tutorial
- $!
- $ TUTOR:
- $ VARS="MANUAL"
- $ EXT="MEM"
- $ FILE="TUTOR"
- $ IF RM .EQS. "" THEN RM=8
- $ GOTO PROCESS
- $ !
- $ ! Build the on-line help manual
- $ !
- $ HELP:
- $ VARS="SYSTEM"
- $ EXT="HLP"
- $ FILE="VI"
- $ IF RM .EQS. "" THEN RM=0
- $ GOTO FINAL
- $ !
- $ PROCESS:
- $ !
- $ DO RUNOFF/LOG/OUT=NLA0:/RIGHT='RM'/INTERMEDIATE/MESS=USER/VAR='VARS' -
- 'FILE'.RNO
- $ !
- $ ! Do the table of contents
- $ !
- $ DO RUNOFF/CONTENTS/OUT='FILE' 'FILE'.BRN
- $ DO RUNOFF/INDEX/OUT='FILE' 'FILE'.BRN
- $ !
- $ FINAL:
- $ DO RUNOFF/LOG/OUT='FILE'.'EXT'/RIGHT='RM'/MESS=USER/VAR='VARS' 'FILE'.RNO
- $ DO PURGE 'FILE'.'EXT','FILE'.RNT
- $ !
- $ DO DELETE 'FILE'.BRN;*
- $ !
- $ IF P1 .NES. "HELP" THEN EXIT
- $ !
- $ INSTALL_HELP:
- $ !
- $ ! Reinstall help file
- $ !
- $ WRITE SYS$OUTPUT " "
- $ IF F$SEARCH("VI.HLB") .EQS. "" THEN DO LIB/LOG/CREATE/HELP VI
- $ INQUIRE/NOPUNCT HELPLIB "Name of library to install HELP files in? "
- $ DO LIB/REPLACE/HELP 'HELPLIB' VI.'EXT'
- $ EXIT
- $ !
- $ ! Just install the HELP file
- $ !
- $ HELPINST:
- $ EXT="HLP"
- $ VARS="HELP"
- $ GOTO INSTALL_HELP
- *$*$*EOD*$*$*
- $ if f$search("DOC.DIR;1") .eqs. "" then -
- CREATE/LOG/DIRECTORY [.DOC]
- $ write sys$output "Creating [.DOC]README."
- $ create [.DOC]README.
- $ DECK/DOLLARS="*$*$*EOD*$*$*"
- There are 17 parts to the distribution of VI written in TPU. The first,
- this file, is a plain text file. The remainder, are DCL command files.
- Files 1-16 should each be executed as DCL procedures in sequence. Below
- is a sequence of steps that should allow you to get VI up and running.
-
- 1) You should pick a directory to place VI under. Three subdirectories
- will be created during the unpacking process. They are [.SRC],
- [.EXE], and [.DOC]. The directory names should reveal the purposes of
- these directories.
-
- 2) Place all 17 of the VI parts into the directory chosen in step 1.
- For each part, 1 through 16, execute each file as a command procedure
- using the command "@<filename>", where <filename> is the name of
- the file to execute (e.g. @VI_001.COM, followed by @VI_002.COM, etc).
- During the execution of VI_016, several diagnostic messages will
- be displayed. You should only pay attention to the final message
- that says that the section file was either installed properly or
- was not.
-
- NOTE:
- [.SRC]MAKE.COM invokes the $ INSTALL program to REPLACE the
- VI$ROOT:[EXE]VI.GBL file IFF it is already installed. One possible
- diagnostic message from INSTALL says
-
- %INSTALL-E-OPENIN, error opening VI$ROOT:<EXE>VI.GBL; as input
- -RMS-F-DEV, error in device name or inappropriate device type for operation
-
- and can be ignored since, obviously, there is no such logical name
- defined.
-
- If you have previously installed VI on your machine, but, VI.GBL is
- not 'installed', then you will get a diagnostic to the effect of
-
- %INSTALL-W-FAIL, failed to DELETE entry for SOME_DEVICE:<SOME_DIRECTORY>VI.GBL
- -INSTALL-E-NOKFEFND, Known File Entry not found
-
- This can also be ignored.
-
- If you previously installed VI on your machine, and VI.GBL is
- 'installed', then this procedure will replace the old one with what
- ever is the latest version of VI.GBL in VI$ROOT:[EXE]. You MUST
- decide whether or not this is what you want to do. You should EDIT
- [.SRC]MAKE.COM and comment out the INSTALL invocation if desired.
-
- 3) After executing the VI_016 command file, you should set default to the
- [.SRC] directory, and use the command "$ @make exe,tpusubs" to create
- the VI.EXE executable, and the CALL_USER routines for VI to use.
-
- 4) Next, set default to [-.DOC] (from the SRC directory), and execute
- the command "$ @VIDOC", and "$ @VIDOC HELP" to create a printable
- version of the current documentation, as well as a HELP file
- that VI can use. When asked the question:
-
- Name of library to install HELP files in?
-
- you should probably answer, VI, unless you really desire to put the
- help file into a library in another directory. VI.TPU contains the
- path VI$ROOT:[DOC]VI.HLB as the place where it will work from, so if
- you do not place the help file in this library (It will automatically
- be created for you), then you must edit VI.TPU to contain the proper
- path.
-
- 5) Here you have a decision to make. I have written an interface to
- callable TPU, [-.SRC]VI.MAR. If you wish to use this interface,
- then there must be a CLD definition for it installed in DCLTABLES.
- This is really only necessary for using VI as a SUB-process, but
- I find it convienent to install the CLD so that I do not have
- to wait for SET COMMAND to complete when I log in. If do not
- wish to use the callable TPU interface then go to the next step NOW,
- otherwise hang tight.
-
- The CLD definition that needs to be installed is in [-.EXE]VI.CLD. If
- you do not have sufficient privileges to install a new DCLTABLES you
- should get prepared to do so, or find someone that will do it for you
- (now is not entirely necessary, as you can skip to step 6, and do this
- later).
-
- a) Take the time to examine the CLD, and make sure it is ok for
- your installation. If you are on a cluster, then there is
- some extra work that I won't describe here since I have never
- done it. Basically you need to do the following set of commands.
- (the dollar signs are provide by DCL in case it wasn't obvious).
-
- $ SET COMMAND [-.EXE]VI.CLD/TABLE=SYS$SHARE:DCLTABLES.EXE/OUT=-
- _$ SYS$SHARE:DCLTABLES.EXE
- $ MCR INSTALL
- INSTALL>SYS$SHARE:DCLTABLES/REPLACE
- INSTALL>EXIT
-
- b) This should be all that single CPU sites need to do. If you
- have a different arrangement at your sight that requires
- something different, then you would know that better than I.
- Remeber that you MUST logout and log back in to have the updated
- DCLTABLES available to your process. Step 8, below, can not be
- done unless you either 1) do not do (c) below, or 2) you logout and
- log back in after reinstalling DCLTABLES.
-
- c) [-.EXE]VI.COM, and [-.EXE]VISETUP.COM contain uses of the symbol,
- "VI". This symbol is normally equated to "EDIT/TPU". Once you
- have made the changes necessary to update DCLTABLES, then these
- references should be changed. In [-.EXE]VI.COM, change VI to
- be "VI", instead of "EDIT/TPU". In [-.EXE]VISETUP.COM, delete
- the assignment to the variable VI, as the comment there says
- to.
-
- 6) Next, set default to [-.EXE] (from [.DOC]), and edit the file
- VISETUP.COM. This file must be executed by each user wishing to
- use VI before they can use it. You should change the definition of
- VI$ROOT to be the parent directory of the directory you are in NOW.
- E.g. if you are in the directory DUA0:[PUBLIC.VI.DOC], then VI$ROOT
- should be defined to be DUA0:[PUBLIC.VI.]. Note that this file
- potentially defines 3 symbols. VI allows normal use of VI, VIS
- allows use of the VI.COM procedure to run VI in a subprocess, and
- VIEW allows READONLY editing of a file (as in UNIX).
-
- 7) The command file VI.COM is used to envoke VI in a sub-process
- so that a minimal amount of overhead for image activation will
- be incurred by the system. In the VI.COM that you have, there
- are invocations of a SUSPEND, and a RESUME command. I use these
- commands to suspend kept editors while they are not it use so that
- they will be swapped out or trimmed by the SWAPPER in a more timely
- manner. This will allow their memory to be put to use by other
- processes whenever possible. If you do not wish to do this and/or
- do not have these facilities available to you, then you should comment
- out these command lines.
-
- You may substitute the use of SET PROC/SUSPEND and SET PROC/RESUME
- for these commands. See the DCL manual or HELP for usage.
-
- 8) Next, you should be ready to give VI a trial run. Execute the
- VISETUP.COM procedure in [.EXE]. Then type VI, and hit return.
- You should be off and running.
-
- ------------------------
- Gregg Wonderly
- Department of Mathematics
- Oklahoma State University
-
- INTERNET: gregg@nemo.math.okstate.edu
- UUCP: {ihnp4, rutgers, isucs1}!okstate!nemo.math.okstate.edu!gregg
-
- US MAIL:
- 401 Mathematical Sciences
- Oklahoma State University
- Stillwater, OK 74078
- *$*$*EOD*$*$*
- $ exit
-